#!/usr/bin/perl

=head1 NAME

Swignition::DataModel::Resource - An RDF resource with a URI.

=cut

package Swignition::DataModel::Resource;

use Swignition::DataModel::Node;

use constant TRUE      =>  1;
use constant FALSE     =>  0;
use strict;

our @ISA = ("Swignition::DataModel::Node");
our $VERSION = '0.1';

=head1 CONSTRUCTORS

=over

=item $node = Swignition::DataModel::Resource->new($model, $uri)

Create a new node. 

=cut

sub new
{
	my $class = shift;
	my $model = shift;
	my $uri   = shift;

	my $existing = $model->lookup_node("$uri", FALSE);
	return $existing
		if defined $existing;
	
	my $this = Swignition::DataModel::Node::new(__PACKAGE__, $model);
	
	return $this->add_uri($uri, 10);
}

=back

=cut

1;

